from AjaxResponse import AjaxResponse
import unittest

class AjaxResponseTestCase(unittest.TestCase):  
    def setUp(self):  
        self.ajaxResp = AjaxResponse(data={'test':'test'})  
      
    def tearDown(self):  
        self.ajaxResp = None  
      
    def testToJson(self):  
        self.assertEqual(self.ajaxResp.toJsonStr(), '{"data": {"test": "test"}, "errInfo": "", "success": true}')  
